home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.1#0"; "COMCTL32.OCX"
- Begin VB.Form frmRemoteDir
- Caption = "Form1"
- ClientHeight = 4950
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 7515
- LinkTopic = "Form1"
- ScaleHeight = 4950
- ScaleWidth = 7515
- StartUpPosition = 3 'Windows Default
- Begin ComctlLib.Toolbar tbRemoteDir
- Align = 1 'Align Top
- Height = 420
- Left = 0
- TabIndex = 3
- Top = 0
- Width = 7515
- _ExtentX = 13256
- _ExtentY = 741
- Appearance = 1
- MouseIcon = "frmRemoteDir.frx":0000
- End
- Begin ComctlLib.ListView lvRemoteDir
- Height = 3825
- Left = 1830
- TabIndex = 0
- Top = 480
- Width = 4515
- _ExtentX = 7964
- _ExtentY = 6747
- LabelWrap = -1 'True
- HideSelection = -1 'True
- ForeColor = -2147483640
- BackColor = -2147483643
- BorderStyle = 1
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MouseIcon = "frmRemoteDir.frx":001C
- NumItems = 0
- End
- Begin ComctlLib.StatusBar sbRemoteDir
- Align = 2 'Align Bottom
- Height = 315
- Left = 0
- TabIndex = 1
- Top = 4635
- Width = 7515
- _ExtentX = 13256
- _ExtentY = 556
- SimpleText = ""
- BeginProperty Panels {2C787A51-E01C-11CF-8E74-00A0C90F26F8}
- NumPanels = 1
- BeginProperty Panel1 {2C787A53-E01C-11CF-8E74-00A0C90F26F8}
- Object.Width = 2540
- MinWidth = 2540
- TextSave = ""
- Key = ""
- Object.Tag = ""
- EndProperty
- EndProperty
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MouseIcon = "frmRemoteDir.frx":0038
- End
- Begin ComctlLib.TreeView tvRemoteDir
- Height = 3765
- Left = 120
- TabIndex = 2
- Top = 540
- Width = 1425
- _ExtentX = 2514
- _ExtentY = 6641
- Style = 7
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- MouseIcon = "frmRemoteDir.frx":0054
- End
- Attribute VB_Name = "frmRemoteDir"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private iNetConnection As iNet
- Private Sub Form_Load()
- Set iNetConnection = frmMain.Inet1
- GetRemoteDirectory
- End Sub
- Private Sub Form_Resize()
- ' Resize the treeview and listview
- tvRemoteDir.Move 0, 0, tvRemoteDir.Width, ScaleHeight
- lvRemoteDir.Move 0, tvRemoteDir.Width, _
- ScaleWidth - tvRemoteDir.Width, ScaleHeight
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- ' The following is NOT required but good practice to ensure that the object
- ' reference count is properly decremented.
- Set iNetConnection = Nothing
- End Sub
- Private Sub GetRemoteDirectory()
- Dim s As String
- Dim p As Long
- ' Validate the Internet connection object
- If Not IsObject(iNetConnection) Then
- MsgBox "No Internet Connection exists"
- Exit Sub
- End If
- If iNetConnection.RemoteHost = "" Then
- iNetConnection.RemoteHost = InputBox$("Enter a remote machine")
- If iNetConnection.RemoteHost = "" Then
- MsgBox "Directory view cancelled"
- Unload Me
- End If
- End If
- p = iNetConnection.Protocol
- iNetConnection.Protocol = icFTP ' Temporarily set protocol to FTP
- iNetConnection.Execute , "DIR" ' Execute an FTP DIR command
- s = iNetConnection.GetChunk(1000)
- iNetConnection.Protocol = p ' Reset the protocol
- Stop
- End Sub
-